package es.deusto.ingenieria.tesoroaventurero;

import java.awt.Point;


public class Personaje extends Point {

	private static final long serialVersionUID = 6883164819924604600L;

	public boolean equals (Object obj){
		if (obj != null  &&  obj instanceof Personaje)
		{
			return ((Personaje)obj).x == this.x && ((Personaje)obj).y == this.y ;   // comparacion a pelo
			
		}
		else
		{
			return false;
		}
	}
	
	public String toString(){
		return "[" + this.x + "," + this.y + "]";
	}
	
	public Personaje clone(){
		Personaje p2 = new Personaje();
		
		p2.x = this.x;
		p2.y = this.y;
		return p2;
	}
}
